##############################################################
## MOD Title:		ezPortal Admin Add-on - EM Friendly
## MOD Author:		Kooky <kooky@altern.org> (n/a) http://perso.edeign.com/kooky/
## MOD Description:	This mod will add an administration to your portal.
##			You can manage some options, change setting, etc...
## MOD Version:		1.1.1
## Compatibility:	2.0.3 - 2.0.10
##
## Installation Level:	Easy
## Installation Time:	10 minutes
## Files to Edit:	4
##			login.php
##			includes/page_header.php
##			language/lang_english/lang_main.php
##			templates/subSilver/overall_header.tpl
## Included Files:	8
##			portal.php
##			portal_db_install.php
##			fetchposts.php
##			admin/admin_portal.php
##			images/smartorsite_logo.gif
##			language/lang_english/lang_portal.php
##			templates/subSilver/portal_body.tpl
##			templates/subSilver/admin/portal_config_body.tpl
##
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## For Security Purposes, Please Check: http://www.phpbbhacks.com/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB Hacks will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbbhacks.com
##############################################################
## Author Notes:
## For any support about this mod contact me on my forum
## Included french language file: lang_french/lang_portal.php
##
## Original Mod Author: Marcus Thiel <thundercat@die-pretorianer.de> - http://www.die-pretorianer.de
## Contributor v1.0.3 - 1.0.5: Willie Yaw <cyborg@cyborgworks.com>
##
## Included:
## ezPortal Mod v2.1.8 by Smartor <smartor_xp@hotmail.com> - http://smartor.is-root.com
## Portal pre-edited files.
## - Recent Topic block (Smartor)
## - Last Reg Users Block (Kooky)
## - Last Visits block (Kooky)
## - Top Posters block (Kooky)
## - Search block (Kooky)
##
##############################################################
## MOD History:
##
## 2004/08/16 - Version 1.1.1
##	- Removed Photo Album Block
##	- Development discontinued
##
## 2004/02/09 - Version 1.1.0
##	- Updated Photo Album Block to v0.9.2
##
## 2004/02/09 - Version 1.0.9
##	- Updated Photo Album Block to v0.9.1
##	- Added 1 field to allow personal gallery viewing
##
## 2003/11/18 - Version 1.0.8
##	- Fixed an SQL error in portal_db_install.php
##
## 2003/11/17 - Version 1.0.7
##	- Added Photo Album block support
##	- Easy Mod compliant
##	- Updated to phpBB 2.0.6
##
## 2003/04/19 - Version 1.0.6
##	- Fixed some code
##	- Added language file
##	- Rewrite Modules setting
##
## ????/??/?? - Version 1.0.5
##	- Added some modules
##
## ????/??/?? - Version 1.0.2
##	- Fixed some errors
##
## ????/??/?? - Version 1.0.0
##	- First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
If EasyMod was not able to complete the SQL database update, then 
copy root/portal_db_install.php to the root of your phpBB forum folder.  Then
Run portal_db_install.php in your browser.  The path might look something like this:

http://yourdomain.com/phpBB2/portal_db_install.php

Then once the database has been successfully updated, delete this file from
the root of your phpBB forum folder...

# 
#-----[ SQL ]--------------------------------- 
# 
CREATE TABLE phpbb_portal ( 
   portal_name VARCHAR(255) NOT NULL, 
   portal_value TEXT NOT NULL, 
   PRIMARY KEY (portal_name) 
); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('welcome_text', 'Welcome to <b>My Community</b><br /><br />Thanks for using ezPortal,<br /><br />Have a good time! ^_^'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('number_of_news', '5'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('news_length', '300'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('news_forum', '1'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('poll_forum', '1'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('number_recent_topics', '5'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('exceptional_forums', ''); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('last_reg', '5'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('last_visits', '5'); 
INSERT INTO phpbb_portal (portal_name, portal_value) VALUES ('top_posters', '5');

#
#-----[ COPY ]------------------------------------------
#
copy root/portal.php to portal.php
copy root/fetchposts.php to fetchposts.php
copy root/admin/admin_portal.php to admin/admin_portal.php
copy root/images/smartorsite_logo.gif to images/smartorsite_logo.gif
copy root/language/lang_english/lang_portal.php to language/lang_english/lang_portal.php
copy root/templates/subSilver/portal_body.tpl to templates/subSilver/portal_body.tpl
copy root/templates/subSilver/admin/portal_config_body.tpl to templates/subSilver/admin/portal_config_body.tpl

#
#-----[ OPEN ]----------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]----------------------------------------
#
?>
#
#-----[ BEFORE ADD ]----------------------------------
#
// Start add - ezPortal Mod
$lang['Home'] = 'Home';
// End add - ezPortal Mod

#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]-----------------------------------
#
redirect(append_sid("index.$phpEx", true));
#
#-----[ REPLACE WITH ]---------------------------
#
redirect(append_sid("portal.$phpEx", true));
# 
#-----[ FIND ]----------------------------------- 
# 
$url = ( !empty($HTTP_POST_VARS['redirect'] 
# 
#-----[ IN-LINE FIND ]----------------------------------- 
# 
index 
# 
#-----[ IN-LINE REPLACE WITH ]----------------------------------- 
# 
portal
#
#-----[ FIND ]-----------------------------------
#
redirect(append_sid("index.$phpEx", true));
#
#-----[ REPLACE WITH ]---------------------------
#
redirect(append_sid("portal.$phpEx", true));
# 
#-----[ FIND ]----------------------------------- 
# 
$url = ( !empty($HTTP_POST_VARS['redirect'] 
# 
#-----[ IN-LINE FIND ]----------------------------------- 
# 
index 
# 
#-----[ IN-LINE REPLACE WITH ]----------------------------------- 
# 
portal
#
#-----[ FIND ]-----------------------------------
#
redirect(append_sid("index.$phpEx", true));
#
#-----[ REPLACE WITH ]---------------------------
#
redirect(append_sid("portal.$phpEx", true));
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]----------------------------------------
#
	'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER ADD ]-----------------------------------
#
	// ezPortal
	'U_PORTAL' => append_sid('portal.'.$phpEx),
	'L_HOME' => $lang['Home'],
#
#-----[ OPEN ]----------------------------------------
#
templates/subSilver/overall_header.tpl
# 
#-----[ FIND ]---------------------------------------- 
# 
<a href="{U_INDEX}" 
# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
{U_INDEX} 
# 
#-----[ REPLACE WITH ]-------------------------------- 
# 
{U_PORTAL}
# 
#-----[ FIND ]---------------------------------------- 
# 
<a href="{U_FAQ}" 
# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
<a href="{U_FAQ}" 
# 
#-----[ IN-LINE BEFORE, ADD ]-------------------------- 
# 
<a href="{U_PORTAL}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{L_HOME}" hspace="3" />{L_HOME}</a>&nbsp;
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM